Integrand size = 17, antiderivative size = 53 \[ \int \frac {1+x+x^2+x^3}{1+x^4} \, dx=\frac {\arctan \left (x^2\right )}{2}-\frac {\arctan \left (1-\sqrt {2} x\right )}{\sqrt {2}}+\frac {\arctan \left (1+\sqrt {2} x\right )}{\sqrt {2}}+\frac {1}{4} \log \left (1+x^4\right ) \]
[Out]
Time = 0.03 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.471, Rules used = {1890, 1176, 631, 210, 1262, 649, 209, 266} \[ \int \frac {1+x+x^2+x^3}{1+x^4} \, dx=\frac {\arctan \left (x^2\right )}{2}-\frac {\arctan \left (1-\sqrt {2} x\right )}{\sqrt {2}}+\frac {\arctan \left (\sqrt {2} x+1\right )}{\sqrt {2}}+\frac {1}{4} \log \left (x^4+1\right ) \]
[In]
[Out]
Rule 209
Rule 210
Rule 266
Rule 631
Rule 649
Rule 1176
Rule 1262
Rule 1890
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1+x^2}{1+x^4}+\frac {x \left (1+x^2\right )}{1+x^4}\right ) \, dx \\ & = \int \frac {1+x^2}{1+x^4} \, dx+\int \frac {x \left (1+x^2\right )}{1+x^4} \, dx \\ & = \frac {1}{2} \int \frac {1}{1-\sqrt {2} x+x^2} \, dx+\frac {1}{2} \int \frac {1}{1+\sqrt {2} x+x^2} \, dx+\frac {1}{2} \text {Subst}\left (\int \frac {1+x}{1+x^2} \, dx,x,x^2\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,x^2\right )+\frac {1}{2} \text {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,x^2\right )+\frac {\text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} x\right )}{\sqrt {2}}-\frac {\text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} x\right )}{\sqrt {2}} \\ & = \frac {1}{2} \tan ^{-1}\left (x^2\right )-\frac {\tan ^{-1}\left (1-\sqrt {2} x\right )}{\sqrt {2}}+\frac {\tan ^{-1}\left (1+\sqrt {2} x\right )}{\sqrt {2}}+\frac {1}{4} \log \left (1+x^4\right ) \\ \end{align*}
Time = 0.04 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.94 \[ \int \frac {1+x+x^2+x^3}{1+x^4} \, dx=\frac {1}{4} \left (-2 \left (1+\sqrt {2}\right ) \arctan \left (1-\sqrt {2} x\right )+2 \left (-1+\sqrt {2}\right ) \arctan \left (1+\sqrt {2} x\right )+\log \left (1+x^4\right )\right ) \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 1.52 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.58
method | result | size |
risch | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}+1\right )}{\sum }\frac {\left (\textit {\_R}^{3}+\textit {\_R}^{2}+\textit {\_R} +1\right ) \ln \left (x -\textit {\_R} \right )}{\textit {\_R}^{3}}\right )}{4}\) | \(31\) |
default | \(\frac {\sqrt {2}\, \left (\ln \left (\frac {1+x^{2}+\sqrt {2}\, x}{1+x^{2}-\sqrt {2}\, x}\right )+2 \arctan \left (\sqrt {2}\, x +1\right )+2 \arctan \left (\sqrt {2}\, x -1\right )\right )}{8}+\frac {\arctan \left (x^{2}\right )}{2}+\frac {\sqrt {2}\, \left (\ln \left (\frac {1+x^{2}-\sqrt {2}\, x}{1+x^{2}+\sqrt {2}\, x}\right )+2 \arctan \left (\sqrt {2}\, x +1\right )+2 \arctan \left (\sqrt {2}\, x -1\right )\right )}{8}+\frac {\ln \left (x^{4}+1\right )}{4}\) | \(118\) |
meijerg | \(\frac {\ln \left (x^{4}+1\right )}{4}+\frac {x^{3} \sqrt {2}\, \ln \left (1-\sqrt {2}\, \left (x^{4}\right )^{\frac {1}{4}}+\sqrt {x^{4}}\right )}{8 \left (x^{4}\right )^{\frac {3}{4}}}+\frac {x^{3} \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \left (x^{4}\right )^{\frac {1}{4}}}{2-\sqrt {2}\, \left (x^{4}\right )^{\frac {1}{4}}}\right )}{4 \left (x^{4}\right )^{\frac {3}{4}}}-\frac {x^{3} \sqrt {2}\, \ln \left (1+\sqrt {2}\, \left (x^{4}\right )^{\frac {1}{4}}+\sqrt {x^{4}}\right )}{8 \left (x^{4}\right )^{\frac {3}{4}}}+\frac {x^{3} \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \left (x^{4}\right )^{\frac {1}{4}}}{2+\sqrt {2}\, \left (x^{4}\right )^{\frac {1}{4}}}\right )}{4 \left (x^{4}\right )^{\frac {3}{4}}}+\frac {\arctan \left (x^{2}\right )}{2}-\frac {x \sqrt {2}\, \ln \left (1-\sqrt {2}\, \left (x^{4}\right )^{\frac {1}{4}}+\sqrt {x^{4}}\right )}{8 \left (x^{4}\right )^{\frac {1}{4}}}+\frac {x \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \left (x^{4}\right )^{\frac {1}{4}}}{2-\sqrt {2}\, \left (x^{4}\right )^{\frac {1}{4}}}\right )}{4 \left (x^{4}\right )^{\frac {1}{4}}}+\frac {x \sqrt {2}\, \ln \left (1+\sqrt {2}\, \left (x^{4}\right )^{\frac {1}{4}}+\sqrt {x^{4}}\right )}{8 \left (x^{4}\right )^{\frac {1}{4}}}+\frac {x \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \left (x^{4}\right )^{\frac {1}{4}}}{2+\sqrt {2}\, \left (x^{4}\right )^{\frac {1}{4}}}\right )}{4 \left (x^{4}\right )^{\frac {1}{4}}}\) | \(282\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 151 vs. \(2 (41) = 82\).
Time = 0.43 (sec) , antiderivative size = 151, normalized size of antiderivative = 2.85 \[ \int \frac {1+x+x^2+x^3}{1+x^4} \, dx=\frac {1}{4} \, {\left (\sqrt {2 \, \sqrt {2} - 3} + 1\right )} \log \left (\sqrt {2 \, \sqrt {2} - 3} {\left (\sqrt {2} + 2\right )} + 2 \, x + \sqrt {2}\right ) - \frac {1}{4} \, {\left (\sqrt {2 \, \sqrt {2} - 3} - 1\right )} \log \left (-\sqrt {2 \, \sqrt {2} - 3} {\left (\sqrt {2} + 2\right )} + 2 \, x + \sqrt {2}\right ) - \frac {1}{4} \, {\left (\sqrt {-2 \, \sqrt {2} - 3} - 1\right )} \log \left ({\left (\sqrt {2} - 2\right )} \sqrt {-2 \, \sqrt {2} - 3} + 2 \, x - \sqrt {2}\right ) + \frac {1}{4} \, {\left (\sqrt {-2 \, \sqrt {2} - 3} + 1\right )} \log \left (-{\left (\sqrt {2} - 2\right )} \sqrt {-2 \, \sqrt {2} - 3} + 2 \, x - \sqrt {2}\right ) \]
[In]
[Out]
Time = 0.17 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.38 \[ \int \frac {1+x+x^2+x^3}{1+x^4} \, dx=\frac {\log {\left (x^{2} - \sqrt {2} x + 1 \right )}}{4} + \frac {\log {\left (x^{2} + \sqrt {2} x + 1 \right )}}{4} + 2 \cdot \left (\frac {1}{4} + \frac {\sqrt {2}}{4}\right ) \operatorname {atan}{\left (\sqrt {2} x - 1 \right )} + 2 \left (- \frac {1}{4} + \frac {\sqrt {2}}{4}\right ) \operatorname {atan}{\left (\sqrt {2} x + 1 \right )} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.43 \[ \int \frac {1+x+x^2+x^3}{1+x^4} \, dx=-\frac {1}{4} \, \sqrt {2} {\left (\sqrt {2} - 2\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x + \sqrt {2}\right )}\right ) + \frac {1}{4} \, \sqrt {2} {\left (\sqrt {2} + 2\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x - \sqrt {2}\right )}\right ) + \frac {1}{4} \, \log \left (x^{2} + \sqrt {2} x + 1\right ) + \frac {1}{4} \, \log \left (x^{2} - \sqrt {2} x + 1\right ) \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.32 \[ \int \frac {1+x+x^2+x^3}{1+x^4} \, dx=\frac {1}{2} \, {\left (\sqrt {2} - 1\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x + \sqrt {2}\right )}\right ) + \frac {1}{2} \, {\left (\sqrt {2} + 1\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x - \sqrt {2}\right )}\right ) + \frac {1}{4} \, \log \left (x^{2} + \sqrt {2} x + 1\right ) + \frac {1}{4} \, \log \left (x^{2} - \sqrt {2} x + 1\right ) \]
[In]
[Out]
Time = 0.44 (sec) , antiderivative size = 156, normalized size of antiderivative = 2.94 \[ \int \frac {1+x+x^2+x^3}{1+x^4} \, dx=\ln \left (\left (16\,x-16\right )\,\left (\frac {\sqrt {-2\,\sqrt {2}-3}}{4}+\frac {1}{4}\right )-8\,x\right )\,\left (\frac {\sqrt {-2\,\sqrt {2}-3}}{4}+\frac {1}{4}\right )-\ln \left (8\,x+\left (16\,x-16\right )\,\left (\frac {\sqrt {-2\,\sqrt {2}-3}}{4}-\frac {1}{4}\right )\right )\,\left (\frac {\sqrt {-2\,\sqrt {2}-3}}{4}-\frac {1}{4}\right )-\ln \left (8\,x+\left (16\,x-16\right )\,\left (\frac {\sqrt {2\,\sqrt {2}-3}}{4}-\frac {1}{4}\right )\right )\,\left (\frac {\sqrt {2\,\sqrt {2}-3}}{4}-\frac {1}{4}\right )+\ln \left (8\,x-\left (16\,x-16\right )\,\left (\frac {\sqrt {2\,\sqrt {2}-3}}{4}+\frac {1}{4}\right )\right )\,\left (\frac {\sqrt {2\,\sqrt {2}-3}}{4}+\frac {1}{4}\right ) \]
[In]
[Out]